package week1.day2;

import java.util.Scanner;

/**
 * @Author fengzihao
 * @Date 2024-04-16 19:26
 */
public class Salary {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String m = sc.nextLine();
        int salary = Integer.parseInt(m);
        int needTaxes = salary - 2000;
        double taxes = 0;
        if (needTaxes < 0) System.out.println("输入的金额有误！");
        else if (needTaxes <= 500) {
            taxes = needTaxes * 0.05;
            System.out.println("缴纳的个税金额是：" + taxes + "到手的工资是：" + (salary - taxes));
        } else if (needTaxes <= 2000) {
            taxes = needTaxes * 0.1 - 25;
            System.out.println("缴纳的个税金额是：" + taxes + "到手的工资是：" + (salary - taxes));
        } else if (needTaxes <= 5000) {
            taxes = needTaxes * 0.15 - 125;
            System.out.println("缴纳的个税金额是：" + taxes + "到手的工资是：" + (salary - taxes));
        } else if (needTaxes <= 20000) {
            taxes = needTaxes * 0.2 - 375;
            System.out.println("缴纳的个税金额是：" + taxes + "到手的工资是：" + (salary - taxes));
        } else if (needTaxes <= 40000) {
            taxes = needTaxes * 0.25 - 1375;
            System.out.println("缴纳的个税金额是：" + taxes + "到手的工资是：" + (salary - taxes));
        } else if (needTaxes <= 60000) {
            taxes = needTaxes * 0.3 - 3375;
            System.out.println("缴纳的个税金额是：" + taxes + "到手的工资是：" + (salary - taxes));
        } else if (needTaxes <= 80000) {
            taxes = needTaxes * 0.35 - 6375;
            System.out.println("缴纳的个税金额是：" + taxes + "到手的工资是：" + (salary - taxes));
        } else if (needTaxes <= 100000) {
            taxes = needTaxes * 0.4 - 10375;
            System.out.println("缴纳的个税金额是：" + taxes + "到手的工资是：" + (salary - taxes));
        } else {
            taxes = needTaxes * 0.45 - 15375;
            System.out.println("缴纳的个税金额是：" + taxes + "到手的工资是：" + (salary - taxes));
        }
    }
}
